//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core;

namespace OpenLS.Spreadsheet
{
    class InsertCellsRangeUndoUnit: IUndoUnit
    {
        public InsertCellsRangeUndoUnit(Worksheet owner, RangeAddress address, CellMoveOrientationHint hint)
        {
            _orientation = hint;
            _owner = owner;
            _address = address;
        }

        readonly CellMoveOrientationHint _orientation;
        readonly Worksheet _owner;
        readonly RangeAddress _address;
        #region IUndoUnit Members

        public void Do()
        {
            _owner.DeleteRange(_owner.GetRange(_address), _orientation);
        }

        public bool Merge(IUndoUnit unit)
        {
            return false;
        }

        #endregion
    }
}
